package com.tsd.core.openweixin.model.message;


import com.tsd.core.openweixin.model.event.SimpleEvent;

import javax.xml.bind.annotation.XmlEnumValue;

/**
 * @author eric
 */
public enum WeixinMessageType {

    @XmlEnumValue("text")
    TEXT(WeixinTextMessage.class),

    @XmlEnumValue("image")
    IMAGE(ImageMessage.class),

    @XmlEnumValue("video")
    VIDEO(VideoMessage.class),

    @XmlEnumValue("location")
    LOCATION(LocationMessage.class),

    @XmlEnumValue("link")
    LINK(LinkMessage.class),

    @XmlEnumValue("event")
    EVENT(SimpleEvent.class),
    @XmlEnumValue("voice")
    VOICE(VoiceMessage.class),
    @XmlEnumValue("news")
    NEWS(VoiceMessage.class),
    @XmlEnumValue("transfer_customer_service")
    TRANSFERCUSTOMERSERVICE(TransferCustomerServiceMessage.class);

    private final Class messageClass;

    WeixinMessageType(Class messageClass) {
        this.messageClass = messageClass;
    }

    public Class getMessageClass() {
        return messageClass;
    }
}
